package com.uum.blog.api.fallback;

import com.uum.blog.api.BlogFeignClient;
import com.uum.common.core.result.Result;
import com.uum.common.core.result.ResultCode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@Slf4j
public class BlogFeignFallbackClient implements BlogFeignClient {

    @Override
    public Result updateAuthorName(@RequestParam("userId") Long userId, @RequestParam("nickname") String nickname) {
        log.error("feign远程调用修改博文作者名字服务异常后的降级方法");
        return Result.failed(ResultCode.DEGRADATION);
    }
}
